package com.lulu.baselib.api.Interceptor;


import com.lulu.baselib.util.LogUtil;

import okhttp3.logging.HttpLoggingInterceptor;

/**
 * Author: XuChang
 * Date: 2019/10/22 22:02
 * Email: 123286473@qq.com
 * Description:日志拦截器
 * History:
 */
public class LogInterceptor {

    static final String TAG = "HttpInterceptor";

    public static HttpLoggingInterceptor getLogInterceptor() {
        HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(message -> LogUtil.d(TAG, message));
        loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
        return loggingInterceptor;
    }
}
